<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    div{
      width: 100px;
      height: 100px;
      border: 1px solid red;
    }
    div:hover{
      /*margin: 20px 0 0 20px;*/
      /*相对定位还可实现元素层叠的问题*/
      position: relative;/*移动某一个元素其他元素不受影响*/
      /*元素右下移动20px*/
      top: 20px;
      left: 20px;
    }
  </style>

</head>
<body>
<div>div1</div>
<div>div2</div>
<div>div3</div>

</body>
</html>